package com.hlkj.baojin.entity;

import com.hlkj.baojin.entity.dto.Details;
import com.hlkj.baojin.entity.dto.StatusDataLog;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * @author lzx
 * @created with: baojin
 * @package com.hlkj.baojin.entity
 * @description:
 * @date 2018/12/17 10:22
 * @modified By:
 * @Copyright © 2018 HAILIANG Info. Tech Ltd. All rights reserved.
 */
@Document
@Getter
@Setter
public class DeviceStatusDataLog {

    @Id
    private String id;
    /**
     * 绑定设备Id
     */
    @Indexed
    private String deviceId;

    private List<StatusDataLog> details;

    /**
     * 数据创建时间 一天一条数据
     */
    private long createTime;


    public DeviceStatusDataLog() {
    }

    public DeviceStatusDataLog(String deviceId, List<StatusDataLog> details,Long time) {
        this.deviceId = deviceId;
        this.details = details;
        this.createTime=time;
    }


}